<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		function valid(){
			console.log("false");
			return false;
		}
	</script>
</head>
<body>
	<form action="a.html">
		<button id="btnSubmit" onclick="return valid()" type="submit">submit</button>

	</form>
</body>
</html>